package com.my.yyr.controller.safty;



import com.my.yyr.dto.RoleDto;
import com.my.yyr.model.Role;
import com.my.yyr.service.safty.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/safty/role")
public class RoleController {
    private final RoleService roleService;
    @Autowired
    public RoleController(RoleService roleService) {
        this.roleService = roleService;
    }


    @GetMapping("")
    public List<Role> getRolePage( RoleDto roleDto){

        return roleService.getRolePage(roleDto);
    }
}
